fix(voice): mirror Web UI STT provider into the Hermes Agent profile config - #2258
Closed
twuijri wants to merge 1 commit into
Closed
fix(voice): mirror Web UI STT provider into the Hermes Agent profile config#2258twuijri wants to merge 1 commit into
twuijri wants to merge 1 commit into
Conversation
…config Voice settings saved in the Web UI only served /api/hermes/stt/transcribe, which is the browser path. Hermes Agent gateway platforms read a separate stt: block from the profile config.yaml plus credentials from the profile .env, so a provider configured in Settings -> Voice never reached Telegram, Discord or any other gateway platform and Hermes kept resolving stt.provider to local. Saving an STT provider whose base URL maps unambiguously to a Hermes provider now mirrors the credential into the profile .env and writes stt.enabled / stt.provider into the profile config.yaml, following the pattern already used for model providers (providers.ts), proxy settings and platform credentials (config.ts). Scoped to Groq for now so a generic OpenAI-compatible endpoint is never silently relabelled. User-written keys under stt: are preserved, and a write failure is logged instead of failing the settings request. Fixes EKKOLearnAI#2257
Owner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2257.
Voice was the only settings group that stopped at the Studio DB: it served
POST /api/hermes/stt/transcribe(browser only), while Hermes Agent gateway platforms read a separatestt:block from the profileconfig.yamlplus credentials from the profile.env. A provider configured in Settings → Voice therefore never reached Telegram, Discord or any other gateway platform, and Hermes kept resolvingstt.providertolocal.What this does
New service
packages/server/src/services/hermes/voice-config-sync.ts, called fromsaveSettingsincontrollers/hermes/stt.ts:.env← the credential under the env var Hermes reads (GROQ_API_KEY), via the existingsaveEnvValueForProfileconfig.yaml←stt.enabled: trueandstt.provider, via the existingupdateConfigYamlForProfileKey names follow the Hermes Agent reference (
website/docs/user-guide/features/voice-mode.md).This is the same pattern Studio already uses elsewhere —
providers.ts:302-369(model providers →custom_providers+ API key in.env),config.ts:438-456(proxy →.env),config.ts:636-691(platform credentials →.env).Deliberate constraints
resolveHermesSttTargetmatches on host, so a generic OpenAI-compatible endpoint is never silently relabelled as a Hermes provider. Adding providers later is one table entry each.api.groq.com.evil.testdoes not match (covered by a test).[stored]never overwrites a real key in.env.stt.local.model,stt.groq.language, etc. are kept; onlyenabledandproviderare set.restartGatewayForProfileif you prefer the change to apply without a manual restart.Verification
tests/server/voice-config-sync.test.ts— 10 new tests (host mapping, look-alike rejection, malformed input, placeholder secret,stt:block creation/merge/replacement, unrelated config untouched): all passtsc --noEmit -p packages/server/tsconfig.jsoncleannpm run harness:checkpassestests/serversuite: 1877 passed, 11 failures instudio-mcp-autoinjectthat are pre-existing onmainand unrelated to this changeOpen question
AGENTS.mdsays "Keep Hermes Agent state separate from Web UI state." I read that as forbidding Web UI state stored inside Hermes, not writing Hermes' own configuration — which Studio already does in the three places above. If you read it more strictly, I'll move the mirror behind an explicit opt-in (a toggle, or an "Apply to Hermes Agent" action) instead of running on save; say the word and I'll push that instead.